<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>班级&学生管理系统</title>
    <link rel="stylesheet" href="./Public/bootstrap-3.3.0-dist/dist/css/bootstrap.min.css">
    <style>
        .box {
            width: 60%;
            margin: 40px auto;
        }
    </style>
</head>
<body>
<div class="box">
    <div class="panel panel-default">
        <div class="panel-heading">学生管理</div>
        <div class="panel-body">
            <table class="table table-striped">
                <tr>
                    <th>学生编号</th>
                    <th>学生姓名</th>
                    <th>学生性别</th>
                    <th>学生年龄</th>
                    <th>操作</th>
                </tr>
                <?php foreach($allStudent as $v){?>
                <tr>
                    <td><?php echo $v['sid']?></td>
                    <td><?php echo $v['sname']?></td>
                    <td><?php echo $v['sex']?></td>
                    <td><?php echo $v['age']?></td>
                    <td>
                        <a href="index.php?c=student&a=editStudent&sid=<?php echo $v['sid']?>&cid=<?php echo $_GET['cid']?>" class="btn btn-primary btn-xs">编辑</a>
                        <a href="javascript:if(confirm('确定删除吗？'))location.href='index.php?c=student&a=deleteStudent&sid=<?php echo $v['sid']?>&cid=<?php echo $_GET['cid']?> '" class="btn btn-danger btn-xs">删除</a>
                    </td>
                </tr>
                <?php }?>
            </table>
            <a href="index.php?c=student&a=addStudent&cid=<?php echo $_GET['cid']?>" type="button" class="btn btn-success">添加学生</a>
            <a href="index.php?c=class&a=index" type="button" class="btn btn-primary">回到班级管理</a>
        </div>
    </div>

</div>
</body>
</html>